//
// Created by Administrator on 2023/7/28.
//
#include <vector>
#include <string>
#include <iostream>
#include <set>

using namespace std;

class Solution {
public:
    int vowelStrings(vector<string> &words, int left, int right) {
        set<char> vowelChar{'a', 'e', 'i', 'o', 'u'};
        int count = 0;
        for (int i = left; i <= right; ++i) {
            // 判断是否首尾都是元音字母
            if (vowelChar.count(words[i].front()) && vowelChar.count(words[i].back()))
                count++;
        }
        return count;
    }

};


int main() {
    vector<string> words{"hey", "aeo", "mu", "ooo", "artro"};
    Solution s;
    cout << s.vowelStrings(words, 1, 4) << endl;
}